using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Common.Pool
{
    public abstract class PoolObject<T> where T : class
    {
        public int Id { get; set; }
        public bool isUsed { get; set; }
        private T target;
        public T Target => target;
        public PoolObject(T target)
        {
            this.target = target;
        }

        public abstract void OnRecycle();
        public abstract void OnSpawn();
        public abstract void OnDestory();
        /// <summary>
        /// 子类通过
        /// </summary>
        /// <returns></returns>
        public abstract PoolObject<T> Clone();

    }
}